<?php
$listLocationRoot   = ListRootCatModunle($module);
$listLocationRoot  .=  List_LocationRoot();
$locations          = array();

$idloc              = ($type=="loc")? $id : 0;  
$sql_select         = "select count(iId) as count from tbllocation where iParentId=$idloc";
$result             = $dbsql->query_fetch($sql_select);
$count_all          = $result['count'];
list($limit_st,$limit_le)	=Slit_Page($count_all);
$sql_select         = "select * from tbllocation where iParentId=$idloc order by iOrder limit $limit_st,$limit_le";
$rs                 = $dbsql->query($sql_select);
$locations          = $dbsql->fetch_rows_array($rs);

?>